# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-aiounittest
_pkgreal=aiounittest
pkgver=1.4.2
pkgrel=0
pkgdesc="Test python asyncio-based code with ease"
url="https://github.com/kwarunek/aiounittest"
arch="noarch"
license="MIT"
depends="py3-wrapt"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-coverage
	py3-pytest
	py3-nose
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/kwarunek/aiounittest/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -v
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
358b7c412f90eb7afc7ed7058e8e2d4426a6c57379d341d997658859ba6054a9a1337d0b05e63a825e28023f02550bd72d65bdb3feab4503c763c98f8c0d19c6  py3-aiounittest-1.4.2.tar.gz
"
